package com.jack.base.service.impl;


import com.jack.base.mapper.BaseMapper;
import com.jack.base.service.BaseService;

/**
 * service 实现类 基类
 * @Description:
 * @author  Li Jiakui
 * @date 2015年7月1日下午1:47:42
 * @version  [Copyright (c) 2014 V001]
 * @see  [相关类/方法]
 * @since  [产品/模块版本]
 */
public abstract class BaseServiceImpl<T> implements BaseService<T> {
	public abstract BaseMapper<T> getMapper();

	@Override
	public int deleteByPrimaryKey(Object primaryKey) {
		return getMapper().deleteByPrimaryKey(primaryKey);
	}

	@Override
	public int insert(T entity) {
		return getMapper().insert(entity);
	}

	@Override
	public int insertSelective(T entity) {
		return getMapper().insertSelective(entity);
	}

	@Override
	public int updateByPrimaryKeySelective(T entity) {
		return getMapper().updateByPrimaryKeySelective(entity);
	}

	@Override
	public int updateByPrimaryKey(T entity) {
		return getMapper().updateByPrimaryKey(entity);
	}

	@Override
	public T selectByPrimaryKey(Object primaryKey) {
		return getMapper().selectByPrimaryKey(primaryKey);
	}
}
